
<template>
  <el-card class="box-card-component" style="position:relative;margin-left: 8px; top: 50%; transform: translate(0,-50%);">
    <div slot="header" class="box-card-header">
    </div>
    <div style="position: relative;">
      <pan-thumb :image="avatar" class="panThumb" />
      <mallki class-name="mallki-text" text="vue-element-admin" />
      <div style="padding-top: 35px" class="progress-item">
        <span>听课人数: {{learningnum}} 人</span>
        <el-progress :percentage=learningnum />
      </div>
      <div class="progress-item">
        <span>睡觉人数: {{sleepingnum}} 人 </span>
        <el-progress :percentage=sleepingnum />
      </div>
      <div class="progress-item">
        <span>交头接耳人数: {{chattingnum}} 人</span>
        <el-progress :percentage=chattingnum />
      </div>
      <div class="progress-item">
        <span>玩手机人数: {{phoningnum}} 人</span>
        <el-progress :percentage=phoningnum  />
      </div>
    </div>
  </el-card>
</template>

<script>
import { mapGetters } from "vuex";
import PanThumb from "@/components/PanThumb";
import Mallki from "@/components/TextHoverEffect/Mallki";

export default {
  name: 'Status',
  components: { PanThumb, Mallki },

  filters: {
    statusFilter(status) {
      const statusMap = {
        success: "success",
        pending: "danger",
      };
      return statusMap[status];
    },
  },
  data() {
    return {
      learningnum: 10, 
      sleepingnum: 20,
      phoningnum: 12,
      chattingnum: 18,
      all: 60,
      
      statisticsData: {
        article_count: 1024,
        pageviews_count: 1024,
      },
    };
  },
  computed: {
    ...mapGetters(["name", "avatar", "roles"]),
  },
};
</script>

<style lang="scss" >
.box-card-component{

  .el-card__header {
    padding: 0px!important;
  }
}
</style>
<style lang="scss" scoped>
.box-card-component {
  .box-card-header {
    position: relative;
    height: 50px;
    // img {
    //   width: 100%;
    //   height: 100%;
    //   transition: all 0.2s linear;
    //   &:hover {
    //     transform: scale(1.1, 1.1);
    //     filter: contrast(130%);
    //   }
    // }
  }
  .mallki-text {
    position: absolute;
    top: 0px;
    right: 0px;
    font-size: 20px;
    font-weight: bold;
  }
  .panThumb {
    z-index: 100;
    height: 70px!important;
    width: 70px!important;
    position: absolute!important;
    top: -45px;
    left: 0px;
    border: 5px solid #ffffff;
    background-color: #fff;
    margin: auto;
    box-shadow: none!important;
    ::v-deep .pan-info {
      box-shadow: none!important;
    }
  }
  .progress-item {
    margin-bottom: 10px;
    font-size: 14px;
  }
  @media only screen and (max-width: 1510px){
    .mallki-text{
      display: none;
    }
  }
}
</style>